/** 
 * This file is part of Wasagent.
 *
 * Wasagent is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Wasagent is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Wasagent. If not, see <http://www.gnu.org/licenses/>.
 * 
 *
 * Option.java : Selects the apropiate test from net.wait4it.wasagent.tests.*
 *               given the correct name
 *
 *
 */

package net.wait4it.wasagent.utils;

import net.wait4it.wasagent.tests.JdbcProviderTest;
import net.wait4it.wasagent.tests.JvmTest;
import net.wait4it.wasagent.tests.SessionManagerTest;
import net.wait4it.wasagent.tests.Test;
import net.wait4it.wasagent.tests.ThreadPoolTest;
import net.wait4it.wasagent.tests.TransactionServiceTest;
import net.wait4it.wasagent.tests.GenericQueryTest;
import net.wait4it.wasagent.tests.CacheService;


/**
 * @author Yann Lambret
 *
 */
public enum Option {

	JVM         ( "jvm", new JvmTest() ),
	JTA         ( "jta", new TransactionServiceTest() ),
	JDBC        ( "jdbc", new JdbcProviderTest() ),
	THREADPOOL  ( "thread-pool", new ThreadPoolTest() ),
	APPLICATION ( "application", new SessionManagerTest() ),
    GENERIC     ( "generic", new GenericQueryTest() ),
    CACHEINST   ( "cache", new CacheService() );


	private final String name;
	private final Test test;

	private Option(String name, Test test) {
		this.name = name;
		this.test = test;
	}

	public String getName() {
		return name;
	}

	public Test getTest() {
		return test;
	}

}
